#include <iostream>
#include <string>
#include <algorithm>
using namespace std;

int main() {
    string num;
    cin>>num;
    string ret;
    int cnt=0;
    for(int i=num.size()-1;i>=0;i--)
    {
        cnt++;
        if(cnt==4)
        {
            ret.push_back(',');
            cnt=1;
        }
        ret.push_back(num[i]);
    }
    reverse(ret.begin(),ret.end());
    cout<<ret<<endl;
    return 0;
}
